package org.lwd.datalink.service.impl;

import org.lwd.datalink.domain.worker.WorkerInfo;
import org.lwd.datalink.mapper.WorkerMapper;
import org.lwd.datalink.service.WorkerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Worker信息配置 Service 接口实现
 *
 * @Author: weidong.lin
 * @Date: create in 2024/4/1 15:50
 */
@Service
public class WorkerServiceImpl implements WorkerService {

    @Resource
    private WorkerMapper workerMapper;

    @Override
    public WorkerInfo getWorker(String ip) {
        return workerMapper.getByAddress(ip);
    }

    @Override
    public List<WorkerInfo> getList() {
        return workerMapper.getList();
    }

    @Override
    public WorkerInfo getById(Long id) {
        return workerMapper.getById(id);
    }
}
